#index-category
  .header
    %span.title= t('.categories_list')
    - if current_user.admin?
      %span.create_btn.btn= link_to "New category", new_category_path

  %table#categories-list.table-striped
    %tr.heading
      %th= t('.name')
      %th= t('.description')
      - if current_user.admin?
        %th
    - @categories.each do |category|
      %tr
        %td.name= category.name
        %td.description= simple_format(category.description)
        - if current_user.admin?
          %td.actions
            = link_to 'Edit', edit_category_path(category)
            = '|'
            = link_to 'Destroy', category, method: :delete, data: { confirm: 'Are you sure?' }

  %p= will_paginate @categories, renderer: BootstrapPagination::Rails

